<template>
  <view class="container">
    <view class="footer">
      <view class="footer-title">
        {{$i18n.t('aboutus')}}
      </view>
      <view class="footer-desc">
        {{ footerInfo.about_us }}
      </view>
      <view class="connect">
        <view class="connect-title">
          {{$i18n.t('contactUs')}}
        </view>
        <view class="connect-body">
          <view class="connect-body-info">
            <view class="connect-body-info-item">
              {{$i18n.t('contactDetails')}}：{{ footerInfo.contact_information }}
            </view>
            <view class="connect-body-info-item">
              {{$i18n.t('faxNumber')}}：{{ footerInfo.fax_number }}
            </view>
            <view class="connect-body-info-item">
              {{$i18n.t('email')}}：{{ footerInfo.email }}
            </view>
            <view class="connect-body-info-item">
              {{$i18n.t('address')}}：{{ footerInfo.address }}
            </view>
          </view>
          <image class="qrcode" :src="footerInfo.qr_code" mode=""></image>
        </view>
      </view>
      <view class="beian">
        <view class="beian-item">
          copyright @ 2012-2021 All Rights Reserved
        </view>
        <view class="beian-item">
          {{ footerInfo.record_number }}
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  import reqApi from "../../api/api.js";
  export default {
    name: "foot",
    data() {
      return {
        footerInfo: {}
      };
    },
    created() {
      this.getData();
    },
    methods: {
      getData() {
        reqApi.basicFooter({}).then((res) => {
          console.log("页脚数据", res);
          this.footerInfo = res.data;
        });
      }
    }
  }
</script>

<style lang="scss" scoped>
  .container {
    .footer {
      background: #104682;
      color: #fff;
      padding: 40rpx;
      box-sizing: border-box;

      .footer-title {
        font-weight: 600;
        font-size: 28rpx;
        color: #FFFFFF;
        margin-bottom: 20rpx;
      }

      .footer-desc {
        font-weight: 400;
        font-size: 24rpx;
        color: #FFFFFF;
        margin-bottom: 40rpx;
        opacity: .8;
      }

      .connect {
        margin-bottom: 40rpx;

        .connect-title {
          font-weight: 600;
          font-size: 28rpx;
          color: #FFFFFF;
        }

        .connect-body {
          display: flex;
          opacity: .8;

          .connect-body-info {
            flex: 1;

            .connect-body-info-item {
              font-weight: 400;
              font-size: 24rpx;
              color: #FFFFFF;
            }
          }

          .qrcode {
            width: 180rpx;
            height: 180rpx;
            background: red;
          }
        }
      }

      .beian {
        .beian-item {
          opacity: .8;
          text-align: center;
          font-weight: 400;
          font-size: 24rpx;
          color: #FFFFFF;
        }
      }
    }
  }
</style>